#include "modifyuserdialog.h"
#include "ui_modifyuserdialog.h"

ModifyUserDialog::ModifyUserDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ModifyUserDialog)
{
    ui->setupUi(this);

}

void ModifyUserDialog::setUi()
{
    ui->lineEdit->setText(username);
    ui->lineEdit_2->setText(password);
    ui->lineEdit_3->setText(email);
    ui->lineEdit_4->setText(tel);
}

//ModifyUserDialog::showEvent(QShowEvent *event)
//{
////    ui->lineEdit->setText(this->username);
////    ui->lineEdit_2->setText(this->password);
////    ui->lineEdit_3->setText(this->email);
////    ui->lineEdit_4->setText(this->tel);
//}

ModifyUserDialog::~ModifyUserDialog()
{
    delete ui;
}

void ModifyUserDialog::on_buttonBox_accepted()
{
    this->username1 = ui->lineEdit->text().trimmed();
    this->password1 = ui->lineEdit_2->text().trimmed();
    this->email1 = ui->lineEdit_3->text().trimmed();
    this->tel1 = ui->lineEdit_4->text().trimmed();


}
